<template>
<div class="login-box">
  <nav-bar title="抢单设置"/>
  <div class="content">
      <j-cell-group>
        <j-cell title="修改支付密码" :value="!settingInfo.isSetPayPass? '未设置': '已设置'" @click.native="goRouter('payPassword')"></j-cell>
        <j-cell title="充值余额" :value="settingInfo.reserveFund <= 0? '未设置': '已设置'" @click.native="goRouter('topup')"></j-cell>
        <j-cell title="设置收款信息" :value="!settingInfo.isSetCollection ? '未设置': '已设置'" @click.native="goRouter('withdrawal/user/list')"></j-cell>
      </j-cell-group>
  </div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
  name: 'setup',
  data() {
    return {
    };
  },
  created() {
  },
  computed: {
    ...mapGetters([
      'settingInfo'
    ])
  },
  mounted() {
  },
  methods: {
    goRouter(path) {
      var query = {};
      if (path === 'topup') {
        query.redirectURL = '/setup/graba';
      }
      this.$router.push({ path: '/' + path, query });
    },
    backRoute() {
      this.$router.push({ path: '/my' });
    },
    exitLogin() {
      localStorage.removeItem('token');
      this.$router.push({ 'path': '/login' });
    }
  }
};
</script>
